package com.day13.ex03;

import java.util.Calendar;

public class CalendaeDemo {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();
        int year=c.get(Calendar.YEAR);
        int month=c.get(Calendar.MONTH)+1;
        int day=c.get(Calendar.DAY_OF_MONTH);
        System.out.println(year+"-"+month+"-"+day);
        c.set(2050,10,10);
        year=c.get(Calendar.YEAR);
        month=c.get(Calendar.MONTH)+1;
        day=c.get(Calendar.DAY_OF_MONTH);
        System.out.println(year+"-"+month+"-"+day);
    }
}
